import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function selectTreeList(query) {
  return request({
    url: '/system/targetlib/selectTreeList',
    method: 'get',
    params: query
  })
}


// 添加指标分类
export function addTargetType(data) {
  return request({
    url: '/system/targetlib/addTargetType',
    method: 'post',
    data: data
  })
}


// 添加指标
export function addTarget(data) {
  return request({
    url: '/system/targetlib/addTarget',
    method: 'post',
    data: data
  })
}


// 查询详情
export function selectById(id) {
  return request({
    url: '/system/targetlib/selectById/'+id,
    method: 'get'
  })
}

// 修改指标
export function updateTarget(data) {
  return request({
    url: '/system/targetlib/updateTarget',
    method: 'put',
    data: data
  })
}



// 查询指标列表
export function selectListByType(param) {
  return request({
    url: '/system/targetlib/selectListByType',
    method: 'get',
    params: param
  })
}




// 删除指标
export function deleteTarget(id) {
  return request({
    url: '/system/targetlib/deleteTarget/'+id,
    method: 'delete'
  })
}

// 删除指标
export function selectTargetTypeById(id) {
  return request({
    url: '/system/targetlib/selectTargetTypeById/'+id,
    method: 'get'
  })
}


// 删除指标
export function getTargetLabel(targetLabel) {
  return request({
    url: '/system/targetlib/getTargetLabel/'+targetLabel,
    method: 'get'
  })
}




